﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Jet.Payment.Cielo.Model
{
    public class Order
    {
        public Order()
        {
            Currency = "986";
            DataHora = DateTime.Now.ToString("yyyy-MM-ddThh:mm:ss");
            Culture = "PT";
        }
        [XmlElement("numero")]
        public string Number { get; set; }
        [XmlElement("valor")]
        public string ValueString
        {
            get { return Utils.ConvertValueToCielo(Value); }
            set { Value = Utils.ConvertValueFromCielo(value); }
        }
        [XmlIgnore]
        public decimal Value { get; set; }
        [XmlElement("moeda")]
        public string Currency { get; set; }
        [XmlElement("data-hora")]
        public string DataHora { get; set; }
        [XmlElement("descricao")]
        public string Description { get; set; }
        [XmlElement("idioma")]
        public string Culture { get; set; }
    }
}
